<div class="quick_create display_none" id=<%= "#{local_assigns[:data_type].to_s}_quick_create" %> >
	<div class="quick_create_text">
		<%= render :partial => '/shared/modal',
			locals: {
				modal_title: "#{t('shared.quick_create.new', name: local_assigns[:data_type].to_s.titleize)}",
				modal_close_class: 'quick_create_close',
			}
		%>

		<div class="modal_text">
		<%
			if local_assigns[:data_type] == 'category'
				url = quick_create_categories_path
			elsif local_assigns[:data_type] == 'mood'
				url = quick_create_moods_path
			elsif local_assigns[:data_type] == 'strategy'
				url = quick_create_strategies_path
			end
		%>

		<%= form_for(local_assigns[:data], url: url) do |f| %>
			<% if local_assigns[:data].errors.any? %>
			  	<div class="error_explanation">
			  	<% if local_assigns[:data_type] == 'category' %>
					<%= t('common.form.error_explanation') %>
			  	<% elsif local_assigns[:data_type] == 'mood' %>
					<%= t('common.form.error_explanation') %>
			  	<% elsif local_assigns[:data_type] == 'strategy' %>
					<%= t('common.form.error_explanation') %>
			  	<% end %>
			  	</div>
			<% end %>

			<%= render :partial => '/shared/quick_create_fields', locals: { data_type: local_assigns[:data_type], f: f } %>

			<div class="clear"></div>

			<div class="actions no_margin_bottom">
				<%= f.hidden_field :tag, :value => local_assigns[:tag] %>
				<%= f.hidden_field :data_type, :value => local_assigns[:data_type] %>
				<%= f.hidden_field :userid, :value => current_user.id %>
				<%= f.submit t('common.actions.add') %>
			</div>
		<% end %>
		</div>
	</div>
</div>
